package OoDay03.Practice;

public class RefArrayDemo {
    public static void main(String[] args) {
        Dog[]dogs=new Dog[3];
        dogs[0]=new Dog("小黑",1,"黑");
        dogs[1]=new Dog("小灰",2,"灰");
        dogs[2]=new Dog("大黄",3,"黄");
        for (int i=0;i<dogs.length;i++){
            System.out.println(dogs[i].name);
        }
        dogs[1].name="小灰灰";
        System.out.println("第二个狗狗的名字叫"+dogs[1].name);
        System.out.println("----------------------");

        Chick[]chicks=new Chick[2];
        chicks[0]=new Chick("大白",3,"白");
        chicks[1]=new Chick("小花",1,"花");
    }
}
